<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>16京东顶部导航条</title>
    <link rel="stylesheet" href="./resource/reset.css">
    <link rel="stylesheet" href="./resource/fontawesome/css/all.css">
    <style>
        /* 设置全局的外框 */
        .top-leader{
            background-color: rgb(227,228,229);
            width: 100%;
            height: 30px;
        }

        /* 设置中间的一大块 */
        .index{
            margin: 0 auto;
            width: 1190px;
            font-size: 12px;
            line-height: 30px;
        }

        /* 将里面的内容横过来 */
        .location{
            width: 58px;
            height: 30px;
            float: left;
            position: relative;
            z-index: 5;
            
        }
        .select{
            float: right;
        }
        .select li{
            float: left;
        }
        /* 设置地址图标位置 */
        .location>.fa-map-marker-alt{
            margin-left: 8px;
        }

        /* 设置位置的隐藏框 */
        .locations{
            display: none;
            width: 322px;
            height: 464px;
            border: 1px solid rgb(204,204,204);
            box-shadow: 0px 1px 1px ;
            top: 29px;
            position: absolute;
            z-index: 1;
        }
        /* 设置隐藏框的显示 */
        .location:hover>.locations{
            display: block;
        }
        .location:hover{
            background-color: white;
            border: 1px solid rgb(204,204,204);
            border-bottom: none;
        }


        /* 将字体统一改了 */
        .location,.sel,a{
            color: #999;
            text-decoration: none;
        }
        /* 统一设置字体被覆盖时颜色 */
        .location>i:hover,a:hover,span:hover{
            color: red;
        }
        /* 设置常驻红色字体 */
        .red,.location>i{
            color: rgb(241,2,21);
        }
        .location>i{
            font-size: 14px;
        }

        /* 设置间隔 */
        .line{
            width: 1px;
            height: 10px;
            background-color: rgb(204,204,204);
            margin-top: 10px;
            margin-left: 12px;
            margin-right: 12px;
        }
        /* 设置第一个和第二个的间隔 */
        .first-sel{
            margin-right: 6px;
        }

        
    </style>
</head>
<body>
    <!-- 全局的外框 -->
    <div class="top-leader">
        <!-- 中间的主要部分 -->
        <div class="index">
            <!-- 左边的地址坐标 -->
            <div class="location">
                <i class="fas fa-map-marker-alt"></i>
                <a href="#">河北</a>
                <div class="locations"></div>
            </div>

            <!-- 右边的栏目条 -->
            <div class="select">
                <ul>
                    <li class="sel first-sel">
                        <a href="#">你好，请登录</a>
                    </li>
                    <li class="sel">
                        <a class="red" href="#">免费注册</a>
                    </li>

                    <!-- 这个是分割线 -->
                    <li class="line"></li>
                    
                    <li class="sel">
                        <a href="#">我的订单</a>
                    </li>
                    <li class="line"></li>
                    <li class="sel">
                        <a href="#">我的京东</a>
                        <i class="fas fa-angle-down"></i>
                    </li>
                    <li class="line"></li>
                    <li class="sel">
                        <a href="#">京东会员</a>
                    </li>
                    <li class="line"></li>
                    <li class="sel">
                        <a class="red" href="#">企业采购</a>
                        <i class="fas fa-angle-down"></i>
                    </li>
                    <li class="line"></li>
                    <li class="sel">
                        <span>商家服务</span>
                        <i class="fas fa-angle-down"></i>
                    </li>
                    <li class="line"></li>
                    <li class="sel">
                        <span>网站导航</span>
                        <i class="fas fa-angle-down"></i>
                    </li>
                    <li class="line"></li>
                    <li class="sel">
                        <span>手机京东</span>
                    </li>
                    <li class="line"></li>
                    <li class="sel">
                        <a href="#">网站无障碍</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    
</body>
</html>